3.5 \(\int \frac{(A+B x) \sqrt{a+b x^2}}{x} \, dx\)

Optimal. Leaf size=79 \[ \frac{1}{2} \sqrt{a+b x^2} (2 A+B x)-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}} \]

[Out]

((2*A + B*x)*Sqrt[a + b*x^2])/2 + (a*B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*
Sqrt[b]) - Sqrt[a]*A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]]

_______________________________________________________________________________________

Rubi [A]  time = 0.213448, antiderivative size = 79, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.35 \[ \frac{1}{2} \sqrt{a+b x^2} (2 A+B x)-\sqrt{a} A \tanh ^{-1}\left (\frac{\sqrt{a+b x^2}}{\sqrt{a}}\right )+\frac{a B \tanh ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a+b x^2}}\right )}{2 \sqrt{b}} \]

Antiderivative was successfully verified.

[In]  Int[((A + B*x)*Sqrt[a + b*x^2])/x,x]

[Out]

((2*A + B*x)*Sqrt[a + b*x^2])/2 + (a*B*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/(2*
Sqrt[b]) - Sqrt[a]*A*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 20.1511, size = 70, normalized size = 0.89 \[ - A \sqrt{a} \operatorname{atanh}{\left (\frac{\sqrt{a + b x^{2}}}{\sqrt{a}} \right )} + \frac{B a \operatorname{atanh}{\left (\frac{\sqrt{b} x}{\sqrt{a + b x^{2}}} \right )}}{2 \sqrt{b}} + \frac{\left (2 A + B x\right ) \sqrt{a + b x^{2}}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((B*x+A)*(b*x**2+a)**(1/2)/x,x)

[Out]

-A*sqrt(a)*atanh(sqrt(a + b*x**2)/sqrt(a)) + B*a*atanh(sqrt(b)*x/sqrt(a + b*x**2
))/(2*sqrt(b)) + (2*A + B*x)*sqrt(a + b*x**2)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.0994853, size = 91, normalized size = 1.15 \[ \sqrt{a+b x^2} \left (A+\frac{B x}{2}\right )-\sqrt{a} A \log \left (\sqrt{a} \sqrt{a+b x^2}+a\right )+\sqrt{a} A \log (x)+\frac{a B \log \left (\sqrt{b} \sqrt{a+b x^2}+b x\right )}{2 \sqrt{b}} \]

Antiderivative was successfully verified.

[In]  Integrate[((A + B*x)*Sqrt[a + b*x^2])/x,x]

[Out]

(A + (B*x)/2)*Sqrt[a + b*x^2] + Sqrt[a]*A*Log[x] - Sqrt[a]*A*Log[a + Sqrt[a]*Sqr
t[a + b*x^2]] + (a*B*Log[b*x + Sqrt[b]*Sqrt[a + b*x^2]])/(2*Sqrt[b])

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 78, normalized size = 1. \[{\frac{Bx}{2}\sqrt{b{x}^{2}+a}}+{\frac{Ba}{2}\ln \left ( x\sqrt{b}+\sqrt{b{x}^{2}+a} \right ){\frac{1}{\sqrt{b}}}}-A\sqrt{a}\ln \left ({\frac{1}{x} \left ( 2\,a+2\,\sqrt{a}\sqrt{b{x}^{2}+a} \right ) } \right ) +A\sqrt{b{x}^{2}+a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((B*x+A)*(b*x^2+a)^(1/2)/x,x)

[Out]

1/2*x*B*(b*x^2+a)^(1/2)+1/2*B*a/b^(1/2)*ln(x*b^(1/2)+(b*x^2+a)^(1/2))-A*a^(1/2)*
ln((2*a+2*a^(1/2)*(b*x^2+a)^(1/2))/x)+A*(b*x^2+a)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(b*x^2 + a)*(B*x + A)/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.285082, size = 1, normalized size = 0.01 \[ \left [\frac{B a \log \left (-2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right ) + 2 \, A \sqrt{a} \sqrt{b} \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) + 2 \, \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \sqrt{b}}{4 \, \sqrt{b}}, \frac{B a \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) + A \sqrt{a} \sqrt{-b} \log \left (-\frac{b x^{2} - 2 \, \sqrt{b x^{2} + a} \sqrt{a} + 2 \, a}{x^{2}}\right ) + \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \sqrt{-b}}{2 \, \sqrt{-b}}, -\frac{4 \, A \sqrt{-a} \sqrt{b} \arctan \left (\frac{a}{\sqrt{b x^{2} + a} \sqrt{-a}}\right ) - B a \log \left (-2 \, \sqrt{b x^{2} + a} b x -{\left (2 \, b x^{2} + a\right )} \sqrt{b}\right ) - 2 \, \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \sqrt{b}}{4 \, \sqrt{b}}, \frac{B a \arctan \left (\frac{\sqrt{-b} x}{\sqrt{b x^{2} + a}}\right ) - 2 \, A \sqrt{-a} \sqrt{-b} \arctan \left (\frac{a}{\sqrt{b x^{2} + a} \sqrt{-a}}\right ) + \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \sqrt{-b}}{2 \, \sqrt{-b}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(b*x^2 + a)*(B*x + A)/x,x, algorithm="fricas")

[Out]

[1/4*(B*a*log(-2*sqrt(b*x^2 + a)*b*x - (2*b*x^2 + a)*sqrt(b)) + 2*A*sqrt(a)*sqrt
(b)*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) + 2*sqrt(b*x^2 + a)*(B*x
 + 2*A)*sqrt(b))/sqrt(b), 1/2*(B*a*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) + A*sqrt(a
)*sqrt(-b)*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) + sqrt(b*x^2 + a)
*(B*x + 2*A)*sqrt(-b))/sqrt(-b), -1/4*(4*A*sqrt(-a)*sqrt(b)*arctan(a/(sqrt(b*x^2
 + a)*sqrt(-a))) - B*a*log(-2*sqrt(b*x^2 + a)*b*x - (2*b*x^2 + a)*sqrt(b)) - 2*s
qrt(b*x^2 + a)*(B*x + 2*A)*sqrt(b))/sqrt(b), 1/2*(B*a*arctan(sqrt(-b)*x/sqrt(b*x
^2 + a)) - 2*A*sqrt(-a)*sqrt(-b)*arctan(a/(sqrt(b*x^2 + a)*sqrt(-a))) + sqrt(b*x
^2 + a)*(B*x + 2*A)*sqrt(-b))/sqrt(-b)]

_______________________________________________________________________________________

Sympy [A]  time = 5.41282, size = 107, normalized size = 1.35 \[ - A \sqrt{a} \operatorname{asinh}{\left (\frac{\sqrt{a}}{\sqrt{b} x} \right )} + \frac{A a}{\sqrt{b} x \sqrt{\frac{a}{b x^{2}} + 1}} + \frac{A \sqrt{b} x}{\sqrt{\frac{a}{b x^{2}} + 1}} + \frac{B \sqrt{a} x \sqrt{1 + \frac{b x^{2}}{a}}}{2} + \frac{B a \operatorname{asinh}{\left (\frac{\sqrt{b} x}{\sqrt{a}} \right )}}{2 \sqrt{b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((B*x+A)*(b*x**2+a)**(1/2)/x,x)

[Out]

-A*sqrt(a)*asinh(sqrt(a)/(sqrt(b)*x)) + A*a/(sqrt(b)*x*sqrt(a/(b*x**2) + 1)) + A
*sqrt(b)*x/sqrt(a/(b*x**2) + 1) + B*sqrt(a)*x*sqrt(1 + b*x**2/a)/2 + B*a*asinh(s
qrt(b)*x/sqrt(a))/(2*sqrt(b))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.229876, size = 105, normalized size = 1.33 \[ \frac{2 \, A a \arctan \left (-\frac{\sqrt{b} x - \sqrt{b x^{2} + a}}{\sqrt{-a}}\right )}{\sqrt{-a}} - \frac{B a{\rm ln}\left ({\left | -\sqrt{b} x + \sqrt{b x^{2} + a} \right |}\right )}{2 \, \sqrt{b}} + \frac{1}{2} \, \sqrt{b x^{2} + a}{\left (B x + 2 \, A\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt(b*x^2 + a)*(B*x + A)/x,x, algorithm="giac")

[Out]

2*A*a*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) - 1/2*B*a*ln(abs(
-sqrt(b)*x + sqrt(b*x^2 + a)))/sqrt(b) + 1/2*sqrt(b*x^2 + a)*(B*x + 2*A)